﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Site.Master" AutoEventWireup="true" CodeBehind="WorkflowTaskParameterList.aspx.cs" Inherits="OccurrencesWeb.Pages.WorkflowTaskParameter.WorkflowTaskParameterList" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">


    <div id="body-content">
        <div id="body-content-title">
            <h2>
                <asp:Literal ID="ltrTitleMenuSelected" runat="server"></asp:Literal></h2>
            <h3>Parâmetros de Tarefas do Workflow</h3>
        </div>
        <div class="frame">
            <div class="frame-body">
                <div>
                    <telerik:RadGrid AutoGenerateColumns="false" ID="gvTaskParameters" OnNeedDataSource="OnTaskParametersNeedDataSource"
                        Width="100%" AllowFilteringByColumn="True" AllowSorting="True" PageSize="15"
                        ShowFooter="True" AllowPaging="True" runat="server" GridLines="None">
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                        <GroupingSettings CaseSensitive="false" />
                        <MasterTableView AutoGenerateColumns="false" HeaderStyle-CssClass="header-rad-columns" AllowFilteringByColumn="True" ShowFooter="false"
                            TableLayout="Fixed">
                            <Columns>
                                 <telerik:GridBoundColumn DataField="WorkflowTaskType.OccurrenceType.Name" HeaderText="Tipo da Ocorrência" FilterControlWidth="150px"
                                    ItemStyle-CssClass="value-column rad-columns" SortExpression="WorkflowTaskType.OccurrenceType.Name"
                                     UniqueName="WorkflowTaskType.OccurrenceType.Name" ItemStyle-Wrap="True" HeaderStyle-Wrap="True">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="WorkflowTaskType.Description" HeaderText="Tarefa no Workflow" FilterControlWidth="150px"
                                    ItemStyle-CssClass="value-column rad-columns" SortExpression="WorkflowTaskType.Description" UniqueName="WorkflowTaskType.Description"
                                    ItemStyle-Wrap="True" HeaderStyle-Wrap="True">
                                </telerik:GridBoundColumn>
                               
                                <telerik:GridBoundColumn DataField="UserProfileExecutor.Name" HeaderText="Perfil Executor" FilterControlWidth="150px"
                                    ItemStyle-CssClass="value-column rad-columns" SortExpression="UserProfileExecutor.Name" UniqueName="UserProfileExecutor.Name"
                                    ItemStyle-Wrap="True" HeaderStyle-Wrap="True">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="UserProfileSupervisor.Name" HeaderText="Perfil Supervisor" FilterControlWidth="150px"
                                    ItemStyle-CssClass="value-column rad-columns" SortExpression="UserProfileSupervisor.Name" UniqueName="UserProfileSupervisor.Name"
                                    ItemStyle-Wrap="True" HeaderStyle-Wrap="True" HtmlEncode="true">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="BusinessDays" HeaderText="Limite de dias úteis para ação" FilterControlWidth="50px"
                                    ItemStyle-CssClass="value-column rad-columns" SortExpression="BusinessDays" UniqueName="BusinessDays">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn HeaderText="Percentual consumido" FilterControlWidth="150px" SortExpression="NofitySupervisorPercentage" AllowFiltering="True"
                                    UniqueName="NofitySupervisorPercentage" >
                                    <ItemTemplate>
                                        <%# DataBinder.Eval(Container.DataItem, "NofitySupervisorPercentage") %>%
                                    </ItemTemplate>
                                    <HeaderStyle Width="50px"></HeaderStyle>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn HeaderText="Editar" ItemStyle-CssClass="value-column rad-columns" AllowFiltering="false">
                                    <ItemTemplate>
                                        <a href='/WorkflowTaskParameter/Maintenance/<%# DataBinder.Eval(Container.DataItem, "Id") %>'>Editar</a>
                                    </ItemTemplate>
                                    <HeaderStyle Width="50px"></HeaderStyle>
                                </telerik:GridTemplateColumn>
                            </Columns>
                            <SortExpressions>
                                <telerik:GridSortExpression FieldName="WorkflowTaskType.OccurrenceType.Name" SortOrder="Ascending" />
                            </SortExpressions>
                        </MasterTableView>
                        <ClientSettings EnableRowHoverStyle="true">
                            <Scrolling AllowScroll="false" />
                        </ClientSettings>
                    </telerik:RadGrid>
                    <br />
                </div>
            </div>
            <div class="frame-navigation">
                <div class="area-buttons">
                    <a href="/WorkflowTaskParameter/Maintenance/" title="Adicionar novo parâmetro" class="bg-button-left">Novo</a>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="AdditionalJavascript" runat="server">
</asp:Content>
